<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Nuovo Pachetto Predefinito</title>
</h:head>
<h:body>
	<h:form>  
    <p:dataTable id="packTable" var="list" value="#{PackBean.pack.getGiornate()}">           
        
        <p:column id="giornata" headerText="">  
            <h:outputText value="Giornata #{list.getNumeroGiornata()}" />  
        </p:column>  
        
        <p:column id="trasporto" headerText="Trasporto">  
            <h:outputText value="#{list.getTrasporto().getVolo().getLuogoArrivo()}" /> 
            <a href="add_volo.xhtml?ng=#{list.getNumeroGiornata()}">Volo</a> 
        </p:column>  

        <p:column id="hotel" headerText="Hotel">  
            <h:outputText value="#{list.getHotel().getNome()}" /> 
            <a href="add_hotel.xhtml?ng=#{list.getNumeroGiornata()}">Hotel</a>  
        </p:column>  
        
        <p:column id="escursione" headerText="Escursione">  
            <h:outputText value="#{list.getEscursione().getNome()}" /> 
            <a href="add_escursione.xhtml?ng=#{list.getNumeroGiornata()}">Escursione</a>  
        </p:column>  
        
	</p:dataTable>
	<br></br>
	<h:outputText value="Costo Totale: #{PackBean.getCostoTotale()}" />
	<br></br>
	<br></br>
	<p:commandButton value="Crea Pacchetto Predefinito" action="#{PackBean.creaPacchetto()}"/>
</h:form>
</h:body>
</html>